package com.analyse.stock.model;

import com.analyse.stock.vo.FinanceDataVO;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_board_category")
public class BoardCategoryModel extends BaseModel<BoardCategoryModel> {
    /**
     * 板块编码
     */
    private String boardCode;

    /**
     * 板块名称
     */
    private String boardName;

    /**
     * 板块分类，region_board-地域板块，concept_board-概念板块，industry_board-行业板块
     */
    private String boardCategory;

    public static BoardCategoryModel transBoardCategoryModel(FinanceDataVO dataVO,String boardCategory){
        BoardCategoryModel model = new  BoardCategoryModel();
        model.setBoardCode(dataVO.getF12());
        model.setBoardName(dataVO.getF14());
        model.setBoardCategory(boardCategory);
        model.setUpdateTime(new Date());
        model.setCreateTime(new Date());
        return model;
    }
}
